#include<bits/stdc++.h>
using namespace std;
int main()
{
	int sum=10000;
	int add=300;
	int lose=600;
	int time=0;
	while (sum)
	{
		
		
		if(sum<600)
		{
			time+=sum/10;
			break;
		}
		else 
			sum=sum+add-lose;
			time+=2*60;
		
	}
	cout<<time;
	return 0;
 } 
